# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="Why - a multi-language multi-prover verification tool"
HOMEPAGE="http://why.lri.fr/index.en.html"
SRC_URI="http://www.lri.fr/~filliatr/ftp/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"

IUSE="coq pvs"
DEPEND="
    >=dev-lang/ocaml-3.07
    >=dev-ml/lablgtk-2.4.0
    coq? ( >=sci-mathematics/coq-7.0 )
    pvs? ( sci-mathematics/pvs )
  "

src_unpack() {
	unpack ${A}
}

src_compile() {
	local myconf="--prefix /usr"
	./configure $myconf || die

	myconf="PVSLIB=/opt/pvs/lib"
	make $myconf || die
}

src_install() {
	local myconf="COQLIB=${D}usr/lib/coq PVSLIB=${D}opt/pvs/lib prefix=${D}usr"
	make $myconf install || die
}
